<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<html>

<head> 
	<meta name="decorator" content="exampleIndex"/> 
<script type="text/javascript"> 
		//验证历史版本
  /* function	check() {
	  var status="";
	  $.ajax({ 
		    type: "GET", 
		    async: false,//同步
		  	url: "${contextPath}/${student.versionUrl}/${student.versionId}/${student.assistId}/${student.mainId}/validate?id=${student.id}",
		  	context: document.body, 
		  	success: function(result){ 
		        	status=result; 
	     	}}); 
		 if(status=="1"){ 
	          $.jBox.confirm("文档版本出错：必须在最新版本上面创建新版本，此版本不是最新版本!", "提示", submit, { buttons: { '查看最新版本': 1, '关闭': 0} }); 
			 return false;
		 } else{
			 return true;
		 }  
	 } */
	 $.validator.setDefaults({
			submitHandler: function() { alert("submitted!"); }
		});
$(document).ready(function() {
	//$("#name").focus();
	/* $("#frm").validate({//，，
		rules: {
			taxAmount: {
				required: true
			},
			taxRate:'required'
		},
		messages: {
			taxAmount: {
				required: '只能位数字'
			},
			taxRate: {
				required: '只能位数字'
			}
		}
	}); */
});

/*  var submit = function (v, h, f) {  
	  if (v == 1) { 
		  $.jBox.close(); 
		  window.open("${contextPath}/${student.versionUrl}/${student.mainId}/${student.versionId}.${student.assistId}/getMainVersion");  
	  }  
	  if (v == 0) {  
		  $.jBox.close();   
	  }    
	  return true;
  };    */

</script>

</head>
<body>
	<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">修改供应商发票信息
				    <a class="btn btn-default btn-sm pull-right o-a-button" role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
				    </h3>
				  </div>
				  <div class="panel-body">
					<form:form id="frm" modelAttribute="obj" action="${contextPath}/biz/statement/exp/update" method="post"
					   class="form-horizontal" role="form" onsubmit="return check()">
						<form:hidden path="id"/>
						<tags:message content="${message}"/>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="startDate" class="col-sm-4 control-label">是否确认:</label>
								<div class="col-sm-8">
									 <form:hidden path="isConfirmed"/>
									 <c:if test="${obj.isConfirmed == false }">
										<a href="${contextPath}/biz/statement/exp/${obj.id }/confirm">确认</a>
									 </c:if>
									 ${obj.isConfirmed }
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="billNo" class="col-sm-4 control-label">来源单号:</label>
								<div class="col-sm-8">
									<form:input id="billNo" path="billNo" htmlEscape="false" class="form-control" disabled="true"/>
								</div>
						 	</div>
						</div>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="supplierName" class="col-sm-4 control-label">供应商名称:</label>
								<div class="col-sm-8">
									<form:input id="supplierName" path="supplierName" htmlEscape="false" class="form-control" disabled="true"/>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="supplierNo" class="col-sm-4 control-label">供应商编号:</label>
								<div class="col-sm-8">
									<form:input id="supplierNo" path="supplierNo" htmlEscape="false" class="form-control" disabled="true"/>
								</div>
						 	</div>
						</div>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="billType" class="col-sm-4 control-label">来源类型:</label>
								<div class="col-sm-8">
									<form:input id="billType" path="billType" htmlEscape="false" class="form-control" disabled="true"/>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="taxRate" class="col-sm-4 control-label">应开票金额:</label>
								<div class="col-sm-8">
									<form:input id="taxRate" path="taxRate" htmlEscape="false" class="form-control" disabled="true"/>
								</div>
						 	</div>
						</div>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="billedAmount" class="col-sm-4 control-label">已开票金额:</label>
								<div class="col-sm-8">
									<form:input id="billedAmount" path="billedAmount" htmlEscape="false" class="form-control" disabled="true"/>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="unbilledAmount" class="col-sm-4 control-label">未开票金额:</label>
								<div class="col-sm-8">
									<form:input id="unbilledAmount" path="unbilledAmount" htmlEscape="false" class="form-control" disabled="true"/>
								</div>
						 	</div>
						</div>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="invoiceCode" class="col-sm-4 control-label">发票代码:</label>
								<div class="col-sm-8">
									<form:input id="invoiceCode" path="invoiceCode" htmlEscape="false" class="form-control"/>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="taxAmount" class="col-sm-4 control-label">价税合计金额:</label>
								<div class="col-sm-8">
									<form:input id="taxAmount" path="taxAmount" htmlEscape="false" class="form-control"/>
								</div>
						 	</div>
						</div>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="taxRate" class="col-sm-4 control-label">税额:</label>
								<div class="col-sm-8">
									<form:input id="taxRate" path="taxRate" htmlEscape="false" class="form-control"/>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="contactNumber" class="col-sm-4 control-label">联系电话:</label>
								<div class="col-sm-8">
									<form:input id="contactNumber" path="contactNumber" htmlEscape="false"
									 class="form-control required"/>
								</div>
						 	</div>
						</div>
						
						<div class="form-group">
						  <div class="col-sm-offset-2 col-sm-10">
						    <input class="btn btn-primary submit" type="submit"  value="保 存"/>
							<input class="btn btn-default" type="button" value="返 回" onclick="history.go(-1)"/>
						  </div>
						</div>
					</form:form>
				  </div>
				</div>	
</body>
</html>